package com.linfeng.component.common.tools;

import com.linfeng.component.common.response.ResponseEntity;

import java.util.Optional;

public class ResponseResultTools {

    public static <T> T getData(ResponseEntity<T> responseEntity) {

        return Optional.ofNullable(responseEntity)
                .orElse(new ResponseEntity<>()).getData();
    }
}
